package com.tepth.appmanageservice.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

import java.util.Timer;
import java.util.TimerTask;

public class ServiceOb extends Service {
	Thread thread = new Thread(new Runnable() {
		@Override
		public void run() {
			Timer timer = new Timer();
			TimerTask task = new TimerTask() {
				@Override
				public void run() {
					ServiceAppManage.RestartService(ServiceOb.this);
				}
			};
			timer.schedule(task, 0, 60 * 1000);
		}
	});

	public int onStartCommand(Intent intent, int flags, int startId) {
		thread.start();
		return START_STICKY;
	}

	@Override
	public IBinder onBind(Intent intent) {
		return null;
	}
}